/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// MpaaRating object for NHibernate mapped table 'MPAARating'.
	/// </summary>
	[Serializable]
    public class MpaaRating : IStandardIdentifier
	{
		#region Member Variables
		protected int _id;
		protected string _name;
		#endregion
		#region Constructors
			
		public MpaaRating() {}
					
		public MpaaRating(string name) 
		{
			this._name= name;
		}

		#endregion
		#region Public Properties
		public  virtual int Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual string Name
		{
			get { return _name; }
			set {_name= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			MpaaRating castObj = (MpaaRating)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
